package mesweb.mesweb.service.impl.produce;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import mesweb.mesweb.controller.produce.ProduceLinePlanResource;
import mesweb.mesweb.dto.ProducePlan.ProduceLinePlanResourceDto;
import mesweb.mesweb.mapper.produce.ProduceLinePlanResourceMapper;
import mesweb.mesweb.service.produce.IProduceLinePlanResourceService;
import mesweb.mesweb.vo.ProducePlan.ProduceLinePlanResourceVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description: 产线工序资源配置
 * @Author: jeecg-boot
 * @Date:   2021-12-07
 * @Version: V1.0
 */
@Service
public class ProduceLinePlanResourceServiceImpl extends ServiceImpl<ProduceLinePlanResourceMapper, ProduceLinePlanResource> implements IProduceLinePlanResourceService {

    @Autowired
    private ProduceLinePlanResourceMapper iProduceLinePlanResourceMapper;
    @Override
    public void initDeviceResource(ProduceLinePlanResourceDto produceLinePlanResourceDto) {
        iProduceLinePlanResourceMapper.initDeviceResource(produceLinePlanResourceDto);
    }

    @Override
    public IPage<ProduceLinePlanResourceVo> getProduceLinePlanResources(Page page, QueryWrapper queryWrapper) {
        return iProduceLinePlanResourceMapper.getProduceLinePlanResources(page,queryWrapper);
    }

    @Override
    public List<ProduceLinePlanResourceVo> getProduceLinePlanResources(QueryWrapper queryWrapper) {
        return iProduceLinePlanResourceMapper.getProduceLinePlanResources(queryWrapper);
    }
}
